<?php
$this->pageTitle=Yii::app()->name . ' - Sign up';
$this->breadcrumbs=array(
	'Sign up',
);
?>
		

<h1>Sign up</h1>
<div class="cl compact">
<?php if(Yii::app()->user->hasFlash('registration_error')): ?>
	<div class="errorMessage">
		<?php echo Yii::app()->user->getFlash('registration_error'); ?>
	</div>
<?php else: ?>
	<?php if(Yii::app()->user->hasFlash('registration')): ?>
		<div class="flash-success">
			<?php echo Yii::app()->user->getFlash('registration'); ?>
		</div>
	<?php else: ?>
		<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'login-form',
			'enableAjaxValidation'=>true
		)); ?>
			<div class="row cl">
				<?php echo $form->labelEx($model,'fio'); ?>
				<div class="inp_text">
					<?php echo $form->textField($model,'fio'); ?>
				</div>
				<?php echo $form->error($model,'fio'); ?>
			</div>
			<div class="row cl">
				<?php echo $form->labelEx($model,'email'); ?>
				<div class="inp_text">
					<?php echo $form->textField($model,'email'); ?>
				</div>
				<?php echo $form->error($model,'email'); ?>
			</div>
			<div class="row cl">
				<?php echo $form->labelEx($model,'password'); ?>
				<div class="inp_text">
					<?php echo $form->passwordField($model,'password'); ?>
				</div>
				<?php echo $form->error($model,'password'); ?>
			</div>
			<div class="row cl">
				<?php echo $form->labelEx($model,'password_twice'); ?>
				<div class="inp_text">
					<?php echo $form->passwordField($model,'password_twice'); ?>
				</div>
				<?php echo $form->error($model,'password_twice'); ?>
			</div>
			<div class="row cl">
				<div class="radio_box cl">
					<?php echo $form->checkBox($model,'agree',  array('checked'=>'checked', 'class'=>'styled')); ?>
					<?php echo $form->label($model,'agree'); ?>
					<?php echo $form->error($model,'agree'); ?>
				</div>
			</div>
			<div class="row cl">
				<?php echo CHtml::submitButton('Sign up', array('class'=>'btn blue br3 fl')); ?>
			</div>
		<?php $this->endWidget(); ?>
	<?php endif; ?>
<?php endif; ?>
</div>